﻿//江苏省厅

//电子图
define([
    "dojo/_base/declare"
    , "esri/layers/TiledMapServiceLayer"
    , "esri/SpatialReference"
    , "esri/geometry/Extent"
    , "esri/layers/TileInfo"
], function (declare
    , TiledMapServiceLayer
    , SpatialReference
    , Extent
    , TileInfo) {
    var Js_vec_c = declare([TiledMapServiceLayer], {
        constructor: function () {
            this.spatialReference = new SpatialReference({wkid: 4326});
            this.initialExtent = (this.fullExtent = new Extent(-180.0, -80.0, 180.0,84, this.spatialReference));
            this.tileInfo = new TileInfo({
                "rows": 256,
                "cols": 256,
                "compressionQuality": 0,
                "origin": {
                    "x": -180,
                    "y": 90
                },
                "spatialReference": {
                    "wkid": 4326
                },
                "lods": [
                    {"level": 0, "resolution": 1.4062478188205787, "scale": 5.909954514364983E8}
                    , {"level": 1, "resolution": 0.7031239094102893, "scale": 2.9549772571824914E8}
                    , {"level": 2, "resolution":  0.3515619547051447, "scale": 1.4774886285912457E8}
                    , {"level": 3, "resolution": 0.17578097735257234, "scale": 7.387443142956229E7}
                    , {"level": 4, "resolution": 0.08789048867628617, "scale": 3.693721571478114E7}
                    ,{"level": 5, "resolution": 0.043945244338143084, "scale": 1.846860785739057E7}
                    , {"level": 6, "resolution": 0.021972622169071542, "scale": 9234303.928695286}
                    , {"level": 7, "resolution":  0.010986311084535771, "scale": 4617151.964347643}
                    , {"level": 8, "resolution": 0.0054931555422678855, "scale": 2308575.9821738214}
                    , {"level": 9, "resolution": 0.0027465777711339428, "scale": 1154287.9910869107}
                    , {"level": 10, "resolution": 0.0013732888855669714, "scale": 577143.9955434554}
                    , {"level": 11, "resolution": 6.866444427834857E-4, "scale": 288571.9977717277}
                    , {"level": 12, "resolution": 3.4332222139174285E-4, "scale": 144285.99888586384}
                    , {"level": 13, "resolution": 1.7166111069587142E-4, "scale": 72142.99944293192}
                    , {"level": 14, "resolution":8.583055534793571E-5, "scale": 36071.49972146596}
                    , {"level": 15, "resolution": 4.2915277673967856E-5, "scale": 18035.74986073298}
                    , {"level": 16, "resolution":  2.1457638836983928E-5, "scale": 9017.87493036649}
                    , {"level": 17, "resolution": 1.0728819418491964E-5, "scale": 4508.937465183245}
                ]
            });
            this.loaded = true;
            this.onLoad(this);
        },
        getTileUrl: function (level, row, col) {
            return `http://10.158.15.45:10030/arcgis/rest/services/tile_cca/MapServer/tile/${level}/${row}/${col}`;
        }
    });
    return Js_vec_c;
});